<template>
    <div class="data">
      <!--
        <div class="cate-nav acea-row row-middle">
            <div class="item cursor" :class="type==1?'on':''" @click="getType(1,'')">预约订单</div>
            <div class="item cursor" :class="type==0?'on':''" @click="getType(0,'')">回收箱订单</div>
        </div>
        -->
      <template v-if="type==1" >

        <Tabs style="margin-top: 40px" value="name1"  @on-click="currentTabChanged" >
          <TabPane    label="全部订单" name="name1"></TabPane>
          <TabPane    label="已签收" name="name4"></TabPane>
          <TabPane    label="已完成" name="name5"></TabPane>
          <TabPane    label="正常订单" name="name2"></TabPane>
          <TabPane   label="异常订单" name="name3"></TabPane>
        </Tabs>
      </template>
      <template v-if="type==0">

        <Tabs style="margin-top: 40px" value="name1"  @on-click="currentTabChanged" >
          <TabPane    label="全部订单" name="name1"></TabPane>
          <TabPane    label="审核中" name="name6"></TabPane>
          <TabPane    label="已完成" name="name5"></TabPane>
        </Tabs>
      </template>
        <div class="acea-row row-middle mt20">
            <div class=" acea-row row-middle">
              <div style="margin-right: 8px" >
                <Input type="text" v-model="from.order_id" placeholder="输入订单号">
                  <template #prepend>
                    <span>订单号</span>
                  </template>
                </Input>
              </div>
                <div style="margin-right: 8px" >
                  <Input type="text" v-model="from.user_phone" placeholder="输入手机号">
                    <template #prepend>
                      <span>手机号</span>
                    </template>
                  </Input>
                </div>
              <div style="margin-right: 8px" >
                <Input type="text" v-model="from.uid" placeholder="用户UID">
                  <template #prepend>
                    <span>UID</span>
                  </template>
                </Input>
              </div>
              <div style="margin-right: 8px" >
              <Select v-model="from.status" style="width:200px">
                <Option v-for="item in typelist" :value="item.value" :key="item.value">{{ item.label }}</Option>
              </Select>
              </div>
<!--                <Space size="large" wrap>-->
                    <DatePicker type="date" placeholder="请选择日期" style="width: 200px" @on-change="getstart" />
<!--                </Space>-->
                <div class="geduan"></div>
<!--                <Space size="large" wrap>-->
                    <DatePicker type="date" placeholder="请选择日期" style="width: 200px" @on-change="getend" />
<!--                </Space>-->
                <div class="chaxun" @click="chaxun">查询</div>
                <div class="chaxun" style="width: 160px;font-size: 12px;background-color: #19be6b;" @click="expxls">按查询条件导出</div>
            </div>
        </div>

        <div class="list mt20">

            <template v-if="type==1">
                <div class="item acea-row row-column row-center" v-for="(item,index) in orderlist" :key="index">
                    <div class="acea-row row-middle bor-b">
                        <div>
                            <span class="daizhipai" v-if="item.status==0">{{ item._status }}</span>
                            <span class="zhipaied" v-else>{{ item._status }}</span>
                        </div>
                        <!--<div class="zhipai-btn ml20" @click="open(item)" v-if="item.status==0">指派员工</div>-->
                        <div class="zhipai-btn ml20" style="background-color: #ff9900;"  @click="quit(item)" v-if="item.status==0">取消订单</div>
                      <div class="zhipai-btn ml20" style="background-color: #2b85e4;"  @click="wuliu(item)" v-if="item.status<8 && item.status>0">查看物流</div>
                        <div class="zhipai-btn ml20" style="background-color: #19be6b;"  @click="sucess_btn(item)" v-if="item.status==5">完成订单</div>
                      <div class="zhipai-btna" style="background-color: #ff9900;" v-if="item.error_status==0"  @click="to_back_btn(item)" >设为用户异常</div>
                      <div class="zhipai-btna"  style="background-color: #19be6b;" v-if="item.error_status>0"  @click="un_back_btn(item)" >设为正常订单</div>
                      <div class="zhipai-btn ml20"  style="background-color: #F52520;" v-if="item.status==0 && !item.mailNo"  @click="show_send(item)">推送德邦</div>


                          <!--
                            <div class="avatar">
                                <img class="imgwh" :src="item.rider_avatar" alt="">
                            </div>
                            -->
                          <!--
                            <div class="acea-row row-column row-between font14 ml40">
                                <div class="color333"><span class="color666">姓名：</span> {{ item.rider_nickname || item.rider_real_name }}</div>
                                <div class="mt20 color333"><span class="color666">联系电话：</span> {{ item.rider_phone }}</div>
                            </div>
                            <div class="acea-row row-column row-between font14 ml40">
                                <div class="color333"><span class="color666">员工编号：</span> {{ item.uid }}</div>
                                <div class="mt20 color333"><span class="color666">服务中订单：</span> {{ item.rider_now_count }}</div>
                            </div>
                            <div class="acea-row row-column row-between  font14 ml40">
                                <div style="height: 20px"></div>
                                <div class="mt20 color333"><span class="color666">累计订单数：</span> {{ item.rider_max_count}}</div>
                            </div>
                            -->

                    </div>
                    <div class="font14">
                        <div class="acea-row mt10">
                            <div class="into">订单偏号：{{ item.order_id }}</div>
                            <div class="into">用户ID：{{ item.uid }} <span style="color: #16ac57;margin-left: 20px;">累计下单：{{item.yy_count}} </span></div>
                            <div class="into">下单时间：{{ item.add_time }}</div>
                          <div style="color: #2b85e4" v-if="item.platform=='mpapp'" >支付宝订单</div>
                          <div style="color: #16ac57" v-else >微信订单</div>
                        </div>
                        <div class="acea-row mt10">
                           <div class="into">包裹重量：{{ item.totalWeight || 0 }} kg</div>
                            <div class="into">运单号：{{ item.mailNo }}</div>
                            <div v-if="item.logisticID.length>0" class="into">德绑单号：{{ item.logisticID}}</div>

                        </div>
                        <div class="acea-row mt10">
                            <div class="into">上门时间：{{ item.yy_time }}</div>
                            <div class="into">上门地址：{{item.province}}-{{item.city}}-{{item.district}}-{{ item.user_address }}</div>
                            <div class="into">联系电话：{{ item.user_phone }}</div>
                            <div style="color: #EB2D2D" v-if="item.error_status==1" class="into">异常状态：地址异常</div>
                            <div style="color: #EB2D2D" v-if="item.error_status==2" class="into">异常状态：重量异常</div>
                            <div style="color: #EB2D2D" v-if="item.error_status==3" class="into">异常状态: 用户被拉黑</div>
                        </div>
                    </div>
                </div>
            </template>

            <template v-if="type==0">
                <div class="por acea-row row-between-wrapper" v-for="(item,index) in orderlist" :key="index">
                    <div class="acea-row row-middle">
                        <div class="pictrue tabBox_img" v-viewer>
                            <img class="imgwh" v-lazy="item.image" alt="">
                        </div>
                        <div class="acea-row row-column row-around ml20">
                            <div class="acea-row">
                                <div>用户ID：{{ item.uid }} <span style="color: #16ac57;margin-left: 20px;">累计下单：{{item.box_count}} </span></div>
                                <div style="margin-left: 20px" >昵称：{{ item.real_name }} <span style="margin-left: 20px;">电话：{{item.user_phone}} </span></div>
                                <div class="ml40">订单时间：{{ item.add_time }}</div>
                            </div>
                            <div class="acea-row row-middle mt10">
                                <div>回收箱ID：{{ item.id }}</div>
                                <div v-if="item.box_info.bili<60" class="ml20" style="color: #16ac57;">当前容量：{{item.box_info.bili}}%</div>
                              <div v-else class="ml20" style="color: #F52520;">容量预警：{{item.box_info.bili}}%</div>
                                <div class="ml40">包估裹重：{{item.yugu_weight }}</div>
                                <div v-if="item.status==3" class="ml40">回收金额：{{ item.price }}</div>
                                <div v-else class="ml40">预估金额：{{ item.price }}</div>
                                <div class="xiugai ml20" v-if="item.status==0" @click.stop="editweight(item)">修改重量</div>
                              <div class="xiugai ml20" v-if="item.status==0" @click.stop="to_back_btn(item)">设为异常用户</div>
                          </div>
                          <div class="acea-row mt10">
                            <div>名称：{{item.box_info.name}}</div>
                            <div class="ml20">地址：{{item.box_info.address}}</div>
                          </div>
                        </div>
                    </div>
                    <div class="error-msg" v-if="item.status==10">拒绝原因：{{ item.mark }}</div>
                    <div class="shenhe" @click.stop="shenheClick(item)" v-if="item.status==0">审核订单</div>
                    <div class="success" v-if="item.status==1">已通过</div>
                    <div class="error" v-if="item.status==10">已拒绝</div>
                </div>
            </template>

            <Col class="demo-spin-col" span="8" v-if="loading">
                <Spin fix>
                    <Icon type="ios-loading" size=18 class="demo-spin-icon-load"></Icon>
                    <div>Loading</div>
                </Spin>
            </Col>

            <div class="acea-row row-right page">
                <Page
                        :total="total"
                        :current="page"
                        show-elevator
                        show-total
                        @on-change="pageChange"
                        :page-size="limit"
                />
            </div>

        </div>

        <Modal v-model="modal1" width="800" :footer-hide="true" class-name="vertical-center-modal">
            <div style="text-align:center;height: 600px;" class="mt20">
                <div class="modle-title bold font16">点击选择派单员工</div>
                <div class="bor-bot"></div>
                <div class="modle-content">
                    <div class="y-item acea-row row-middle" v-for="(item,index) in staffList" :key="index">
                        <div class="y-pic" v-viewer>
                            <img class="imgwh" :src="item.avatar" alt="">
                        </div>
                        <div class="acea-row row-column row-between color666 font12 ml20">
                            <div class="acea-row row-middle">
                                <div class="y-width">姓名： <span class="color333">{{ item.staff_name }}</span> </div>
                                <div class="y-width">员工编号：<span class="color333">{{ item.uid }}</span> </div>
                                <div class="select" @click="select(item)">选择</div>
                            </div>
                            <div class="acea-row row-middle mt10">
                                <div class="y-width">联系电话： <span class="color333">{{ item.phone }}</span> </div>
                                <div class="y-width">服务中订单： <span class="color333">{{ item.mew_count || 0 }}</span> </div>
                                <div class="y-width">累计订单数：<span class="color333">{{ item.max_count || 0 }}</span> </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </Modal>

        <Modal
                v-model="modal2"
                title="提示"
                @on-ok="confirm"
                >
            <p>是否确定指派此员工？</p>
        </Modal>

        <Modal v-model="modal3" width="600" :footer-hide="true" class-name="vertical-center-modal">
            <div style="height: 300px;" class="mt20">
                <div class="modle-title bold font16 acea-row row-center">审核订单</div>
              <div class="bor-bot" style="color: #777;line-height: 50px;margin-bottom: 50px;text-align: center;">
                请您确认订单是否通过,通过后将发放佣金给用户。
              </div>
                <div class="bor-bot"></div>
                <Form :model="formItem" :label-width="80" style="margin-top: 30px">
                    <FormItem label="审核状态">
                        <RadioGroup v-model="formItem.status">
                            <Radio label="1">通过</Radio>
                            <Radio label="10" class="ml20">拒绝</Radio>
                        </RadioGroup>
                    </FormItem>
                    <FormItem label="审核原因">
                        <Input v-model="formItem.mark" type="textarea" :autosize="{minRows: 2,maxRows: 5}" placeholder="请输入拒绝原因"></Input>
                    </FormItem>
                    <FormItem>
                        <Button type="primary" @click.stop="handleSubmit">提交</Button>
                    </FormItem>
                </Form>
            </div>
        </Modal>

        <Modal v-model="modal4" width="600" :footer-hide="true" class-name="vertical-center-modal">
            <div style="height: 250px;" class="mt20">
                <div class="modle-title bold font16 acea-row row-center">修改重量</div>

                <div class="bor-bot"></div>
                <Form :model="formWeight" :label-width="80" style="margin-top: 30px">
                    <FormItem label="id">
                        <Input v-model="formWeight.id" disabled placeholder="Enter something..."></Input>
                    </FormItem>
                    <FormItem label="输入重量">
                        <Input v-model="formWeight.weight" type="number" placeholder="请输入重量"></Input>
                    </FormItem>
                    <FormItem>
                        <Button type="primary" @click.stop="submitWeight">保存</Button>
                    </FormItem>
                </Form>
            </div>
        </Modal>

      <Modal v-model="modalq" width="600" @on-ok="quit_order" @on-cancel="cancel"  class-name="vertical-center-modal">
        <div style="height: 250px;" class="mt20">
          <div class="modle-title bold font16 acea-row row-center">订单取消</div>
          <div class="bor-bot" style="color: #777;line-height: 50px">
            订单已经推送到德绑,业务员可能正在赶往揽件,是否确认取消订单。
          </div>

        </div>
      </Modal>

      <Modal v-model="modallh" width="600" @on-ok="to_backurl" @on-cancel="cancel"  class-name="vertical-center-modal">
        <div style="height: 250px;" class="mt20">
          <div class="modle-title bold font16 acea-row row-center">拉黑用户</div>
          <div class="bor-bot" style="color: #777;line-height: 50px">
            是否拉黑用户，拉黑后他能下单不会推送到德邦，线下回收不识别重量。
          </div>

        </div>
      </Modal>

      <Modal v-model="modalun" width="600" @on-ok="un_backurl" @on-cancel="cancel"  class-name="vertical-center-modal">
        <div style="height: 250px;" class="mt20">
          <div class="modle-title bold font16 acea-row row-center">订单恢复</div>
          <div class="bor-bot" style="color: #ff9900;line-height: 50px">
              如果是用户拉黑，则会把用户从黑名单拉出来
          </div>
          <div  class="bor-bot" style="color: #777;line-height: 50px;margin-top: 40px;">
            订单恢复为正常并会在半小时内自动下单到德邦请您确认
          </div>

        </div>
      </Modal>

      <Modal v-model="modalsend" width="600" @on-ok="send_btn" @on-cancel="cancel"  class-name="vertical-center-modal">
        <div style="height: 250px;" class="mt20">
          <div class="modle-title bold font16 acea-row row-center">推送到德邦</div>
          <div class="bor-bot" style="color: #ff9900;line-height: 50px">
            确认后会把订单推送到德邦
          </div>
          <div  class="bor-bot" style="color: #777;line-height: 50px;margin-top: 40px;">
            请推送后确认是否出现德邦订单号
          </div>
        </div>
      </Modal>

      <Modal v-model="modals" width="600" @on-ok="success_order" @on-cancel="cancel"  class-name="vertical-center-modal">
        <div style="height: 250px;" class="mt20">
          <div class="modle-title bold font16 acea-row row-center">确认订单完成</div>
          <div class="bor-bot" style="color: #777;line-height: 50px;margin-bottom: 50px;">
            请您确认订单是否完成,确认完成后将发放佣金给用户。
          </div>
          <div style="height: 250px;" class="mt20">
            <div class="modle-title bold font16 acea-row row-center">修改重量</div>
            <div class="bor-bot">

            </div>
            <div>
              <span>重量/kg：</span>
              <Input v-model="weight" style="width: 120px;" type="number" placeholder="不需修改则不用填"></Input>
            </div>
            <div class="bor-bot">

            </div>
            <div class="bor-bot" style="color: #777;line-height: 50px;margin-bottom: 50px;">
              如需修改重量请在上方填写单位kg
            </div>


          </div>

        </div>
      </Modal>

      <Modal v-model="modalwl" width="1000">
        <div  class="mt20">
          <div class="modle-title bold font16 acea-row row-center">物流信息</div>

            <Timeline >
              <TimelineItem v-for="(item,index) in wlinfo " >
                <p class="time">{{item.time}}</p>
                <p class="content">{{item.city}} - {{item.site}}</p>
                <p class="content">{{item.description}}</p>
              </TimelineItem>
            </Timeline>


        </div>
      </Modal>

    </div>
</template>

<script>
import {
  orderApi,
  chackBoxorder,
  setorderweight, quitorder, successorder, orderwl, toback, unback, orderApixls, senddebang,
} from '@/api/index'
    import {
        storeStaff,
        binsstoreStaff
    } from '@/api/user'
    export default {
        name: "Data",
        data(){
            return {
                cityList: [
                    '重量排序',
                    '时间排序',
                    '时间排序',
                    '时间排序'
                ],
                typelist:[
                  {
                    value: '',
                    label: "全部"
                  },
                  {
                    value: 1,
                    label: "已接单"
                  },
                  {
                    value: 2,
                    label: "待送达"
                  },
                  {
                    value: 3,
                    label: "已完成"
                  },
                  {
                    value: 5,
                    label: "已签收"
                  },
                  {
                    value: 9,
                    label: "揽件失败"
                  },
                  {
                    value: 10,
                    label: "用户取消"
                  },
                  {
                    value: 11,
                    label: "后台取消"
                  },
                  {
                    value: 12,
                    label: "德邦取消"
                  },
                ],
                citymodel: '时间排序',
                type:1,
                date:'',
                nextdate:'',

                modal1: false,
                modal2: false,
                modal3: false,
                modal4: false,
                from:{
                    order_id:'',
                    // uid: this.$store.state.userInfo.userInfo.id,
                    uid:'',
                    // type:'0',//0回收箱订单 1衣服 2家电 3家具
                    add_time:[],
                    user_phone:'',
                    status:'',
                },
                Jfrom:{
                    id:'',
                    uid:'',
                },
                total:0,
                image:'',
                page:1,
                limit:10,
                staffList:[],
                orderlist:[],
                loading:false,
                status:1,
                formItem:{
                    id:'',
                    status:'',
                    mark:''
                },
                formWeight:{
                    id:'',
                    weight:'',
                },
              modalq:0,
              modals:0,
              modalwl:0,
              modallh:0,
              modalun:0,
              wlinfo:{},
              weight:0,
              modalsend:0,
              err_status:'',

            }
        },

      mounted() {
            // this.getTimers();
            this.getlist();
            this.getstaff();
        },
        methods:{
            editweight(item){
                this.modal4 = !this.modal4;
                this.formWeight.id = item.order_id;
            },
          currentTabChanged(name){
            //防止多次点击已显示标签页重复刷新问题
            if (name != this.tabName) {
              this.tabName=name;
              switch (name){
                case "name1":
                  this.err_status='';
                  break;
                case "name2":
                  this.err_status=0;
                  break;
                case "name3":
                  this.err_status=1;
                  break;
                case "name4":
                  this.from.status=5;
                  break;
                case "name5":
                  this.from.status=3;
                  break;
                case "name6":
                  this.from.status=0;
                  break;
              }
              this.page = 1;
              this.getlist();
            }
          },

            submitWeight(){
                if( !this.formWeight.weight ) return this.$Message.error('请填写重量');
                setorderweight(this.formWeight).then(res=>{
                    this.$Message.success(res.msg);
                    this.modal4 = !this.modal4;
                    this.getlist();
                }).catch(err=>{
                    this.$Message.error(err.msg);
                })
            },
            handleSubmit () {
                chackBoxorder(this.formItem.id,{
                    status: this.formItem.status,
                    mark: this.formItem.mark
                }).then(res=>{
                    this.$Message.success(res.msg);
                    this.modal3 = !this.modal3;
                    this.getlist();
                }).catch(err=>{
                    this.$Message.error(err.msg);
                })
            },
            shenheClick(item){
                this.formItem.id = item.id;
                this.modal3 = !this.modal3;
            },
            chaxun(){
                // console.log(this.from.add_time)
                // if( this.from.add_time.length==2 ) return this.$Message.error('请选择完整时间');
                this.page = 1;
                this.getlist();
            },
            expxls(){
                let that = this
                let type = null;
                if( that.type==1 ){
                  type = [1,2,3]
                }else{
                  type = 0;
                }
                that.loading = true;
                orderApixls({
                  order_id: that.from.order_id,
                  uid : that.from.uid,
                  add_time : that.from.add_time,
                  type : type,
                  user_phone: that.from.user_phone,
                  page : that.page,
                  error_status:that.err_status,
                  limit : that.limit,
                  status:that.from.status,
                }).then(res=>{
                  setTimeout(()=>{
                    window.location=res.data[0];
                  },500)
                }).catch(err=>{
                  that.loading = false;
                })
            },
            getstaff(){
              let that = this;
                storeStaff().then(res=>{
                    that.staffList = res.data.list;
                })
            },
            quit_order(){
              quitorder(this.Jfrom.id).then(res=>{
                this.$Message.success(res.msg);
                this.modalq=0;
                this.getlist();
              }).catch(err=>{
                this.$Message.error(err.msg);
                this.modalq=0;
              })
            },
          wuliu(item){
            orderwl(item.order_id).then(res=>{
              this.modalwl=1
              this.wlinfo=res.data;
            }).catch(err=>{
              this.$Message.error(err.msg);
              this.modalwl=0;
            })
          },
          show_send(item){
              this.modalsend=1;
            this.Jfrom.id = item.order_id;
          },
          send_btn(){
            senddebang(this.Jfrom.id).then(res=>{
              this.modalsend=0
              this.$Message.success(res.msg);
              this.getlist();
            })
          },
          to_back_btn(item){
              this.modallh=!this.modallh;
            this.Jfrom.id = item.order_id;
          },
          un_back_btn(item){
            this.modalun=!this.modalun;
            this.Jfrom.id = item.order_id;
          },

          to_backurl(){
            toback(this.Jfrom.id).then(res=>{
              this.$Message.success(res.msg);
            }).catch(err=>{
              this.$Message.error(err.msg);
            })
          },

          un_backurl(){
            unback(this.Jfrom.id).then(res=>{
              this.$Message.success(res.msg);
            }).catch(err=>{
              this.$Message.error(err.msg);
            })
          },
          success_order(){
            let  aform={
              'weight':this.weight,
            }
            successorder(this.Jfrom.id,aform).then(res=>{
              this.$Message.success(res.msg);
              this.modalq=0;
              this.getlist();
            }).catch(err=>{
              this.$Message.error(err.msg);
              this.modalq=0;
            })
          },

            getlist(){
              let that = this
                let type = null;
                if( that.type==1 ){
                    type = [1,2,3]
                }else{
                    type = 0;
                }
                that.orderlist = [];
                that.loading = true;
                orderApi({
                    order_id: that.from.order_id,
                    uid : that.from.uid,
                    add_time : that.from.add_time,
                    type : type,
                    user_phone: that.from.user_phone,
                    page : that.page,
                    error_status:that.err_status,
                    limit : that.limit,
                    status:that.from.status,
                }).then(res=>{
                    setTimeout(()=>{
                        that.loading = false;
                        that.orderlist = res.data.list;
                        that.total = res.data.count;
                        console.log('123456')
                    },500)
                }).catch(err=>{
                    that.loading = false;
                })
            },
            // 切换
            Clicktype(val){
                let that = this, list = that.cityList;
                that.citymodel = list[val].label;
            },
            pageChange(index){
                this.page = index;
                this.getlist();
            },
            select(item){
                this.modal1 = !this.modal1;
                this.modal2 = !this.modal2;
                this.Jfrom.uid = item.uid;
            },
            open(item){
                this.modal1 = !this.modal1;
                this.Jfrom.id = item.order_id;
            },
            quit(item){
              this.modalq = !this.modalq;
              this.Jfrom.id = item.order_id;
            },
            sucess_btn(item){
              this.modals = !this.modals;
              this.Jfrom.id = item.order_id;
            },
            // getTimers(){
               // let time = new Date();
               // let year = time.getFullYear();
               // let month = time.getMonth() + 1;
               // let day = time.getDate();
               // this.date = year + '-'+ month + '-'+ day;
               // let tomorrow = new Date(time.getTime() + 86400000);
               // let nextyear = tomorrow.getFullYear();
               // let nextmonth = tomorrow.getMonth()+1;
               // let nextday = tomorrow.getDate();
               // this.nextdate = nextyear + '-'+ nextmonth + '-'+ nextday;
               // this.from.add_time[0] = this.date;
               // this.from.add_time[1] = this.nextdate;
            // },
            getend(e){
                console.log(e)
                this.from.add_time[1] = e;
            },
            getstart(e){
                console.log(e)
                this.from.add_time[0] = e;
            },
            getType(val,err_status){
                console.log(val)
                if(val==1){
                  this.typelist=[
                    {
                      value: '',
                      label: "全部"
                    },
                    {
                      value: 1,
                      label: "已接单"
                    },
                    {
                      value: 2,
                      label: "待送达"
                    },
                    {
                      value: 3,
                      label: "已完成"
                    },
                    {
                      value: 5,
                      label: "已签收"
                    },
                    {
                      value: 9,
                      label: "揽件失败"
                    },
                    {
                      value: 10,
                      label: "用户取消"
                    },
                    {
                      value: 11,
                      label: "后台取消"
                    },
                    {
                      value: 12,
                      label: "德邦取消"
                    },
                  ];
                }else{
                  this.typelist=[
                    {
                      value: '',
                      label: "全部"
                    },
                    {
                      value: 0,
                      label: "待审核"
                    },
                    {
                      value: 2,
                      label: "审核成功"
                    },
                    {
                      value: 3,
                      label: "已完成"
                    },
                    {
                      value: 10,
                      label: "审核失败"
                    },
                  ];
                }
                this.$set(this,'type',val)
                this.page = 1;
                this.err_status=err_status;
                this.getlist();
                // this.type = val;

            },
            confirm(){
                let that = this;
                binsstoreStaff({id:that.Jfrom.id,uid:that.Jfrom.uid }).then(res=>{
                    that.$Message.success(res.msg);
                    setTimeout(()=>{
                        that.getlist();
                    })
                }).catch(err=>{
                    that.$Message.error(err.msg);
                })
            },
            cancel(){
              this.modalq=0;
              this.modals=0;
            }
        }
    }
</script>

<style scoped lang="less">

    .vertical-center-modal{
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .vertical-center-modal .ivu-modal{
        top: 0;
    }
    .modle-title{
        color: #333333;
        font-size: 22px;
        font-weight: bold;
    }

    .bor-bot{
        width: 100%;
        height: 1px;
        background-color: #DCDCDC;
        margin: 5px 0;
    }
    .xiala{
        width: 150px;
        height: 32px;
        border-radius: 5px;
        border: 1px solid #999999;
    }

    .success{
        width: 150px;
        height: 40px;
        border-radius: 20px;
        text-align: center;
        line-height: 40px;
        font-size: 16px;
        letter-spacing: 4px;
        color: #FFFFFF;
        background-color: #26C691;
    }
    .error{
        width: 150px;
        height: 40px;
        border-radius: 20px;
        text-align: center;
        line-height: 40px;
        font-size: 16px;
        letter-spacing: 4px;
        color: #FFFFFF;
        background-color: #EB2D2D;
    }
    .error-msg{
        color: #EB2D2D;
    }

    .xiugai{
        font-size: 14px;
        color: #004FD8;
        text-decoration: underline;
    }


    .modle-content{
        width: 100%;
        height: 90%;
        /*border: 1px solid red;*/
        padding: 20px 10px;
        overflow-y: scroll;

        .y-item{
            width: 100%;
            height: 100px;
            border: 1px solid #DCDCDC;
            box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.2);
            border-radius: 4px;
            margin-bottom: 20px;
            padding: 0 20px;

            .y-pic{
                width: 60px;
                height: 60px;
                border: 1px solid #DCDCDC;
                border-radius: 3px;
                overflow: hidden;
            }

            .y-width{
                width: 200px;
                text-align: left;
            }
            .select{
                width: 90px;
                line-height: 30px;
                border-radius: 20px;
                border: 2px solid #3C6CFE;
                color: #3C6CFE;
                font-weight: bold;
                font-size: 12px;
            }

        }
    }


    .data{

        .cate-nav{
            width: 100%;

            .item{
                padding: 5px 0;
                margin-right: 20px;
                font-size: 12px;

                &.on{
                    font-size: 14px;
                    font-weight: bold;
                    border-bottom: 2px solid #4589F6;
                    color: #4589F6;
                }
            }
        }

        .content{
            width: 200px;
            height: 32px;
            padding: 0 5px;
            border-radius: 5px;
            border: 1px solid #888;
            margin-left: 10px;
        }
        .chaxun{
            width: 75px;
            height: 32px;
            background-color: #2d8cf0;
            color: #fff;
            text-align: center;
            line-height: 32px;
            border-radius: 5px;
            letter-spacing: 4px;
            font-size: 14px;
            margin-left: 20px;
        }
        .geduan{
            width: 15px;
            height: 1px;
            background-color: #999;
            margin: 0 10px;
        }
        .list{

            .item{
                width: 100%;
                background-color: #D8E7FF;
                border-radius: 6px;
                font-size: 16px;
                margin-bottom: 20px;
                padding: 20px;
               position: relative;

               .zhipai-btn{
                   width: 120px;
                   height: 35px;
                   border-radius: 20px;
                   background: rgba(69, 137, 246, 0.7);
                   color: #ffffff;
                   text-align: center;
                   line-height: 35px;
               }
              .zhipai-btna{
                width: 100px;
                height: 28px;
                border-radius: 12px;
                background: rgba(69, 137, 246, 0.7);
                color: #ffffff;
                text-align: center;
                line-height: 28px;
                position: absolute;
                right: 20px;
                font-size: 14px;
              }
                .daizhipai{
                    color: #EB2D2D;
                    font-size: 20px;
                }
                .zhipaied{
                    color: #4589F6;
                    font-size: 20px;
                }
                .bor-b{
                    padding-bottom: 20px;
                    border-bottom: 2px solid rgba(69, 137, 246, 0.6);
                }
                .avatar{
                    width: 80px;
                    height: 80px;
                    border-radius: 50%;
                    background-color: #1890ff;
                    overflow: hidden;
                }
                .into{
                    width: 400px;
                }

            }

            .por{
                width: 100%;
                /*height: 90px;*/
                padding: 20px;
                background-color: #F5F5F5;
                border-radius: 6px;
                font-size: 16px;
                margin-bottom: 20px;

                .pictrue{
                    width: 80px;
                    height: 80px;
                    border-radius: 6px;
                    background-color: #333;
                }
                .shenhe{
                    width: 150px;
                    height: 40px;
                    border-radius: 20px;
                    text-align: center;
                    line-height: 40px;
                    font-size: 16px;
                    letter-spacing: 4px;
                    color: #FFFFFF;
                    background-color: #2d8cf0;
                }
            }

        }

    }
    .btn-right{
      position: absolute;
      right: 20px;

    }
    .time{
      font-size: 14px;
      font-weight: bold;
    }
    .content{
      padding-left: 5px;
    }
</style>
